import i18n from '@app-base/common/utils/i18next';
import { ENTITY_TYPE_VERTEX, NMMeshBaseCommand } from '@app-nextmesh/types';
import BaseCollectionDialog from './BaseCollection';
import { schema2 } from './jsonSchema';

const CollectionType = 'ReferPoint';
export const cmdReferPoint: NMMeshBaseCommand = {
  id: 'cmdReferPoint',
  label: 'command.collection.referPoint',
  icon: 'commands/simu/referPoint',
  create: (label, onClose, _, customParams) => (
    <BaseCollectionDialog
      title={i18n.t(label)}
      onClose={onClose}
      schema={schema2}
      params={customParams}
      pickTypes={[ENTITY_TYPE_VERTEX]}
      collectionType={CollectionType}
    />
  ),
};
